<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作业2</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="root">
        <img :src="path[isClick ? 0:1]" height="800px"/>
        <button @click="isClick = !isClick ">点我切换图片</button>

        
    </div>
    <script>
        var app = new Vue({
            el:"#root",
            data:{
                path:["img/1661852684313.jpg","img/1661852684335.jpg"],
                isClick:false
            }
        })
    </script>
</body>
</html>